package network.course3.fixedthreadpool;

public class Account {
    private static double money;

    public Account(double money) {
        this.money = money;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }
    public double outMoney(double outMoney,String type){
        if (type.equals("Atm")){
            return outByAtm(outMoney);
        }else {
            return outByWindow(outMoney);
        }

    }
    private double outByAtm(double outMoney){
        money-=outMoney;
        return money;

    }
    private double outByWindow(double outMoney){
        money-=outMoney;
        return money;

    }


}
